fn main() {
	name := 'Bob'
	println('Hello, $name!')
	
	x := 123.4567
	println('[${x:.2}]')       // round to two decimal places => [123.46]
	println('[${x:10}]')       // right-align with spaces on the left => [   123.457]
	println('[${int(x):-10}]') // left-align with spaces on the right => [123       ]
	println('[${int(x):010}]') // pad with zeros on the left => [0000000123]
	println('[${int(x):b}]')   // output as binary => [1111011]
	println('[${int(x):o}]')   // output as octal => [173]
	println('[${int(x):X}]')   // output as uppercase hex => [7B]

	println('[${10.0000:.2}]')  // remove insignificant 0s at the end => [10]
	println('[${10.0000:.2f}]') // do show the 0s at the end, even though they do not change the number => [10.00]
}

// format specifier: ${varname:[flags][width][.precision][type]}
//     flags: -, to left-align output within the field, default to right-align
//            0, use 0 as the padding character instead of the default space character
//     width: an integer value describing the minimum width of total field to output
//     precision: an integer value preceded by a `.`, ignored if varialbe is an integer
//     type: f and F: the input is a float and should be rendered as such
//           e and E: the input is a float and should be rendered exponent notation
//           g and G: floating point notation for small values and exponent notation for large values
//           d: the input is an integer and should be rendered in base-10 digits
//           x: rendered as hexadecimal digits
//           o: rendered as octal digits
//           b: rendered as binary digits
//           s: requires a string
